import os
HOSTNAME = '127.0.0.1'
PORT = '3306'
DATABASE = 'zhiliao02'
USERNAME = os.getenv('MYSQL_USERNAME')
PASSWORD = os.getenv('MYSQL_PASSWORD')
HOST = '0.0.0.0'

DB_URI = "mysql+pymysql://{username}:{password}@{host}:{port}/{db}?charset=utf8".format(
    username=USERNAME, password=PASSWORD, host=HOSTNAME, port=PORT, db=DATABASE)
# SECRET_KEY = os.urandom(20)
SECRET_KEY = os.getenv('SECRET_KEY')
SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = False
DEBUG = True
CMS_USER_ID = 'fffffs'
FRONT_USER_ID = 'djkllslnsl'

MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = '690631890@qq.com'
MAIL_PASSWORD = os.getenv('MAIL_PASSWORD')
MAIL_SUPPRESS_SEND = False
MAIL_DEFAULT_SENDER = '690631890@qq.com'

UEDITOR_UPLOAD_PATH = os.path.join(os.path.dirname(__file__), 'imgs')
UEDITOR_UPLOAD_TO_QINIU = False
UEDITOR_QINIU_ACCESS_KEY = ""
UEDITOR_QINIU_SECRET_KEY = ""
UEDITOR_QINIU_BUCKET_NAME = ""
UEDITOR_QINIU_DOMAIN = ""

PER_PAGE = 7

UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), 'upload')
USER_AVATARS = os.path.join(os.path.dirname(__file__), 'imgs')

QINIU_AK = 'zBsdNu-1cDX9pcSp0obBQFeoxk1lrwfOYL6qqbUv'
QINIU_SK = os.getenv('QINIU_SK')
QINIU_BUCKET = 'pythonforum'
QINIU_DOMAIN = 'hugaojian.com/'


# 生成token加的salt
SALT = os.getenv('SALT')
